/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.legendshop.oa.dao.AdminAuthDao;
import com.legendshop.oa.model.UserEntity;
import com.legendshop.oa.service.AdminAuthService;

/**
 * 后台权限过滤权限管理服务类
 * @author Tony
 *
 */
@Service
public class AdminAuthServiceImpl implements AdminAuthService {
	
	/** The jdbc template. */
	@Autowired
	private AdminAuthDao adminAuthDao;
	
	/**
	 * 后台用户登录
	 * 
	 */
	public UserEntity loadUserByUsername(String username, String presentPassword){
		return adminAuthDao.loadAdminUserByUsername(username, presentPassword);
		
	}
	
	/**
	 * 目前还没有调用，默认是前端登录
	 * remember me会调用
	 */
	@Override
	public UserEntity loadUserByUsername(String username) {
		return adminAuthDao.loadUserByUsername(username);
	}


	public void setAdminAuthDao(AdminAuthDao adminAuthDao) {
		this.adminAuthDao = adminAuthDao;
	}

	


}
